package com.sitech.ibnms.util;

import java.io.UnsupportedEncodingException;

public class CharsetUtil {
	
	 public static String encode(String str) {
		 if(str==null || str.equals("")){
		 return str;
		 }
		 str = str.trim();
		 try {
			 str = java.net.URLDecoder.decode(str, "UTF-8");
		 } catch (UnsupportedEncodingException e) {
			 e.printStackTrace();
		 }
		 return str;
	 }
}
